package com.fy.common.exception;

import com.fy.common.vo.ApiRest;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

public class ExceptionResolver {

    @ExceptionHandler(ServiceException.class)
    @ResponseBody
    public ApiRest handler1(ServiceException exception){
        return ApiRest.failure(exception.getMessage(), null);
    }
}
